{block name="content"}

<form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">

    <div class="layui-card-body think-box-shadow padding-left-40">

        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs9 relative">
                <span class="color-green">标题</span>
                <input name="title" class="layui-input" value="{$vo.title|default=''}" disabled>
            </label>
        </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs9 relative">
                <span class="color-green">姓名</span>
                <input name="title" class="layui-input" value="{$user['nickname']|default=''}" disabled>
            </label>
        </div>

        <div class="layui-form-item layui-row layui-col-space15">
            <label class="layui-col-xs9 relative">
                <span class="color-green">手机</span>
                <input name="title" class="layui-input" value="{$user['phone']|default=''}" disabled>
            </label>
        </div>

        <div class="layui-form-item block">
            <span class="label-required-prev color-green">帮助我们详细内容</span>
            <textarea name="content" disabled>{$vo.content|default=''|raw}</textarea>
        </div>

        <div class="layui-form-item text-center">
            {notempty name='vo.id'}<input type="hidden" name="id" value="{$vo.id}">{/notempty}
            <button class="layui-btn" ng-click="hsitoryBack()" type="button">返回</button>
            {eq name='vo.is_deal' value='0'}
            <button class="layui-btn layui-btn-danger"  data-action="{:url('deal')}" data-value="id#{$vo.id}">处理</button>
            {/eq}
        </div>

    </div>
</form>
{/block}

{block name='script'}
<script>
    window.form.render();
    require(['ckeditor', 'angular'], function () {
        window.createEditor('[name="content"]', {height: 500});
        var app = angular.module("GoodsForm", []).run(callback);
        angular.bootstrap(document.getElementById(app.name), [app.name]);

        function callback($rootScope) {
            $rootScope.isAddMode = parseInt('{$isAddMode|default=0}');
            // 返回帮助我们列表
            $rootScope.hsitoryBack = function () {
                history.back(), $.msg.close(index);
            };
            // 设置默认值
            $rootScope.setValue = function (key, type, value, call) {
                $rootScope.maps[key] || ($rootScope.maps[key] = {});
                return $rootScope.maps[key][type] = eval(call.replace('_', "'" + value + "'"));
            };
            // 读取默认值
            $rootScope.getValue = function (key, callback) {
                if (typeof callback === 'function') {
                    return callback($rootScope.maps[key] || {});
                }
                return {};
            };
            // 去除空白字符
            $rootScope.trimSpace = function (value) {
                return (value + '').replace(/\s*/ig, '');
            };
        }
    })
</script>
{/block}

{block name='style'}
<style>
    .uploadimage {
        width: 375px;
        height: 156px;
    }
</style>
{/block}